home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / unitmacs.lzh / MLTIDIAL.MAC < prev    next >
Text File  |  1990-02-19  |  4KB  |  80 lines

  1. # This macro will dial multiple numbers for multi-line BBS's and
  2. # prompt for re-tries.  Edit modem codes, login, and setup file names.
  3. me('Loading          BBS set-up file') w(05) loadsetup('      .set') w(05) 
  4. se('atz\r\n') w(10) se('ats7=17\r\n') w(10) se('atx4\r\n') w(10) 
  5. me('Dialing           BBS. Will re-dial w/# cycle') 
  6. # Set 1 must be equal to entries in redial list. Dial and login follows:
  7. se('atdt       \r\n') w(05) set(1,8) set(2,0) set(3,0) 
  8. # If "CONNECT", 3 Crs and log in.  If not, "FAILED!" + re-dial. 
  9. if(!get('CONNECT',20)) ju(1) 
  10. :7 
  11. # Put login code here.  Carriage returns, no line feeds for Unix.
  12. # Edit codes for your purposes. 
  13. # Send up to 8 Cr's, hangup, try next #.  If ok, login. 
  14.   ec('\r\nSending carriage returns...\r\n') w(50) 
  15.   ec('1\r\n') se('\r') w(40) ec('2\r\n') se('\r') 
  16.   ec('Should get system message here.  If not, more Cr`s\r\n') 
  17.   if(!ge('login:',04)) ec('3\r\n') se('\r') if(!ge('login:',04)) ju(9) 
  18. :8 
  19. # Name here if connect is successful and get 1st prompt.
  20.   w(05) se('     \r') 
  21. # Password code here 
  22.   ge('Your password:',60) w(05) se('     \r') 
  23. # login is successful and screen history is turned on.  End macro.
  24.   history(1) me('History recording is on') w(20) exit(0) 
  25. :1 
  26. # If @1 is "0", jump to (5), prompt for re-tries. Otherwise, dial alts. 
  27.   if(!or(@1,0)) Ju(5) 
  28. # Fail and re-dial timeout. 
  29.   if(com('1',"@3')) me('Will dial in 30 seconds.') w(270) ju(2) 
  30.   ec('Failed!\r\n') ec('\n') me('Re-dial in 15 seconds.') w(120) 
  31. :2 
  32. # Re-dial count, display, and check follows: @1= retry countdown @2=retry# 
  33.   set(1,add(@1,-1)) set(2,add(@2,1)) con('RETRY# ',"@2') ec($T) ec('\r\n') 
  34. :3 
  35. # Re-dial with 7 alternate numbers: 
  36. # First time, 1st # (8) is skipped so num. in top row should be same as
  37. # num. already dialed above. 
  38. # #s must be in order bottom-to-top with '1' in bottom "com" argument. 
  39.   me('Re-dialing Eskimo N. BBS. Cntrl-C aborts. NOW!') w(30) 
  40.   if(com("@1','8')) me('Dialing port 1') se('atdt       \r\n') 
  41.   if(com("@1','7')) me('Dialing port 2') se('atdt       \r\n') 
  42.   if(com("@1','6')) me('Dialing port 3') se('atdt       \r\n') 
  43.   if(com("@1','5')) me('Dialing port 4') se('atdt       \r\n') 
  44.   if(com("@1','4')) me('Dialing port 5') se('atdt       \r\n') 
  45.   if(com("@1','3')) me('Dialing port 6') se('atdt       \r\n') 
  46.   if(com("@1','2')) me('Dialing port 7') se('atdt       \r\n') 
  47.   if(com("@1','1')) me('Dialing port 8') se('atdt       \r\n') 
  48. # If no "CONNECT", check count, and re-dial. If yes, return to login. 
  49.   if(get('CONNECT',20)) ju(7) 
  50. :4 
  51. # Check if @1 = "1". If so, prompt to re-try or quit.  If not, re-dial. 
  52.   if(com("@1,'1')) ju(5) 
  53.   ec('\nFailed!\r\n') w(10) me('Re-dial in 15 sec.') w(120) ju(2) 
  54. :5 
  55. # Prompt to try again or end macro. 
  56.   ec('Failed! More retries?\r\n') w(05) 
  57. # Set @1 must be one more than # of re-dial entries in list. 
  58.   if(input('All Failed. Try Again? OK or Cancel')) set(1,9) ju(2) 
  59.   ec('FINISHED.\r\n') w(10) exit(0) 
  60. :6 
  61. # If no response after connect, "FAILED!", hangup, dial next #. 
  62.   ec('No Response.  Will hangup!\r\n') w(20) drop( ) w(05) assert( ) w(05) 
  63. # Check if @1 = "1". Yes, prompt to re-try or quit.  No, re-dial. 
  64.   if(com("@1,'1')) ju(5) 
  65.   ec('\r\n') ju(1) 
  66. :9 
  67. # Send more Cr's and check for response.  May have to edit prompts.
  68.   ec('4\r\n') set(3,0) se('\r') 
  69.   if(!ge('login:',04)) ec('5\r\n') se('\r') if(!ge('login:',04)) ju(10) 
  70.   ju(8) 
  71. :10 
  72.   ec('6\r\n') se('\r') 
  73.   if(!ge('login:',04)) ec('7\r\n') se('\r') if(!ge('login:',04)) ju(11) 
  74.   ju(8) 
  75. :11 
  76.   se('\r') ec('Sent 8th Carriage Return.  Hangup if no go.\r\n') 
  77. # Set #3 changes 20 sec. timeout to 30. Ju(6)=hang+dial next. (8)=login 
  78.   if(!ge('login:',04)) set(3,1) ju(6) 
  79.   ju(8)
  80.